﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Web;

namespace demo86.Models
{
    public class Result
    {
        /// <summary>
        /// ID
        /// </summary>
        public int ID { get; set; }
    
        /// <summary>
        /// 链接
        /// </summary>
        public string url { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 头像地址
        /// </summary>
        public string img { get; set; }

        /// <summary>
        /// 正文内容
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 分类
        /// </summary>
        public string Where { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 日期
        /// </summary>
        [DataType(DataType.Date)]
        public DateTime date { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string author { get; set; }
    }
    public class ResultDbContext : DbContext
    {
        public ResultDbContext() : base("ResultDbContext")
        {

        }


        public DbSet<Result> Results { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            // modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}